package cn.mw.cmdb.service;

import cn.mw.cmdb.entity.InstanceImportHistoryInfo;
import cn.mw.cmdb.entity.InstanceImportResultInfo;
import cn.mw.components.mongodb.entity.SearchParam;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;
import java.util.Map;

public interface InstanceImportHistoryService {

    boolean saveInstanceImportHistory(InstanceImportHistoryInfo instanceImportHistoryInfo);

    boolean batchSaveInstanceImportResult(List<InstanceImportResultInfo> instanceImportResultInfoList);

    Object getInstanceImportHistoryInfoByPage(SearchParam param) throws Exception;

    Object getInstanceImportDetailByPage(SearchParam param) throws Exception;

    Map<String, Integer> getInstanceImportHistoryInfoStatusCount(SearchParam param) throws Exception;

    void export(SearchParam param, HttpServletRequest request, HttpServletResponse response) throws Exception;

    void exportExcelImportResult(SearchParam param, HttpServletRequest request, HttpServletResponse response) throws Exception;

    void updateRollBackFlag(List<String> historyIds) throws Exception;
}
